﻿using System;
using System.Data;
using System.Collections;
using CE.Database;

/// <summary>
/// Summary description for NonGGCarDriverDB
/// </summary>
namespace CE.CarInsurance
{
    public class NonGGCarDriverDB
    {
        public Int64 Insert(NonGGCarDriver nonggcardriver)
        {
            MyDatabase _db = new MyDatabase("GG_CRMDBConnectionString");
            Int64 _result = -1;
            string _spName = "sprocCXCRMNonGGCarDriverInsertUpdateSingleItem";

            SortedList _sPara = new SortedList();

            #region Parameter
            _sPara.Add("@CarDriverId", nonggcardriver.CarDriverId);
            _sPara.Add("@CECarId", nonggcardriver.CECarId);
            _sPara.Add("@RefCEUserId", nonggcardriver.RefCEUserId);
            _sPara.Add("@AgentId", nonggcardriver.AgentId);
            _sPara.Add("@FullName", nonggcardriver.FullName);
            _sPara.Add("@DOB", nonggcardriver.DOB);
            _sPara.Add("@IDNo", nonggcardriver.IDNo);
            _sPara.Add("@LicenseNumber", nonggcardriver.DrivingLicenseNumber);
            _sPara.Add("@Status", nonggcardriver.Status);
            #endregion

            _result = _db.ExecuteSP(_spName, _sPara);

            return _result;
        }

    }
}